import { apiUrl } from '@/common/js/Base.js';
// apiUrl.rare = 'http://10.131.101.207:8083/2.0/';
export const congenica = {
    /**登陆**/
    addPatient(obj) {
        return $ajax.post(apiUrl.rare + 'congenicahelper/patient/addPatient', obj).then(function(res) {
            return Promise.resolve(res.data)
        })
    },
    getHome(obj) {
        return $ajax.post(apiUrl.rare + 'congenicahelper/patient/getHome', obj).then(function(res) {
            return Promise.resolve(res.data)
        })
    },
    getFileList(obj){
        return $ajax.get(apiUrl.rare + 'congenicahelper/file/getFileList', { params: obj }).then(function(res) {
            return Promise.resolve(res.data)
        })
    },
    submit(obj){
        return $ajax.get(apiUrl.rare + 'congenicahelper/patient/submit', { params: obj }).then(function(res) {
            return Promise.resolve(res.data)
        })
    },
    getPatientDetail(obj){
        return $ajax.get(apiUrl.rare + 'congenicahelper/patient/getPatientDetail', { params: obj }).then(function(res) {
            return Promise.resolve(res.data)
        })
    },
    getSampleList(obj){
        return $ajax.get(apiUrl.rare + 'congenicahelper/sample/getSampleList', { params: obj }).then(function(res) {
            return Promise.resolve(res.data)
        })
    },
    deleteSampleById(obj) {
        return $ajax.post(apiUrl.rare + 'congenicahelper/sample/deleteSampleById', obj).then(function(res) {
            return Promise.resolve(res.data)
        })
    },
    addpatientChpo(obj) {
        return $ajax.post(apiUrl.rare + 'congenicahelper/chpo/UpdateChpoByPatientId', obj).then(function(res) {
            return Promise.resolve(res.data);
        })
    },
    getpatientChpo(obj) {
        return $ajax.get(apiUrl.rare + 'congenicahelper/chpo/getChpoByPatientId', { params: obj }).then(function(res) {
            return Promise.resolve(res.data);
        })
    },
    getChpo(obj) {
        return $ajax.post(apiUrl.rare + 'congenicahelper/chpo/getChpoByFeature', obj).then(function(res) {
            return Promise.resolve(res.data);
        })
    },
    addPatient(obj) {
        return $ajax.post(apiUrl.rare + 'congenicahelper/patient/addPatient', obj).then(function(res) {
            return Promise.resolve(res.data);
        })
    },
    deletePatientById(obj){
        return $ajax.post(apiUrl.rare + 'congenicahelper/patient/deletePatientById', obj).then(function(res) {
            return Promise.resolve(res.data);
        })
    },
    updatePatient(obj){
        return $ajax.post(apiUrl.rare + 'congenicahelper/patient/updatePatient', obj).then(function(res) {
            return Promise.resolve(res.data);
        })
    },
    addSample(obj){
        return $ajax.post(apiUrl.rare + 'congenicahelper/sample/addSample', obj).then(function(res) {
            return Promise.resolve(res.data);
        })
    },
    updateSample(obj){
        return $ajax.post(apiUrl.rare + 'congenicahelper/sample/updateSample', obj).then(function(res) {
            return Promise.resolve(res.data);
        })
    }
}